import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import locale from 'element-ui/lib/locale/lang/en' // lang i18n

import '@/styles/index.scss' // global css
// 全局组件注册
import PageHeader from '@/components/PageHeader'
import CityView from '@/components/city'

import App from './App'
import store from './store'
import router from './router'
import Shajs from 'jssha'
// import '@/styles/sidebar.scss'
import '@/icons' // icon
import '@/permission' // permission control
// 导入富文本编辑器
import VueQuillEditor from 'vue-quill-editor'
// 导入富文本编辑器的样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import ScreenFull from './components/screenfull'
import i18n from '@/lang'
import Lang from './components/Lang'
import echarts from 'echarts'
Vue.prototype.$echarts = echarts
Vue.component('Lang', Lang)

Vue.component('ScreenFull', ScreenFull) // 注册全屏组件

import TagsView from './components/TagsView'
Vue.component('TagsView', TagsView)
// 全局注册富文本编辑器
Vue.use(VueQuillEditor)
Vue.prototype.$Shajs = Shajs
// set ElementUI lang to EN
// Vue.use(ElementUI, { locale })
// 如果想要中文版 element-ui，按如下方式声明
Vue.use(ElementUI)
Vue.component(PageHeader.name, PageHeader)
Vue.component(CityView.name, CityView)

Vue.config.productionTip = false

// 配置ElementUI的中英切换逻辑
Vue.use(ElementUI, {
  i18n: (key, value) => i18n.t(key, value)
})

new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App)
})

